package org.dhbw.jee.business.db;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQuery;

@Entity(name = "INTERPRET")
@NamedQuery(name = Interpret.GETALL, query = "SELECT i FROM INTERPRET i")
public class Interpret implements Serializable {
	private static final long serialVersionUID = 1L;

	public static final String GETALL = "Interpret.findAll";

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "ID")
	private int id;

	@Column(name = "NAME")
	private String name;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getId() {
		return id;
	}

	@Override
	public String toString() {
		return new StringBuilder().append("Interpret (").append(id).append(", ").append(name).append(")").toString();
	}

}
